# eval动态执行函数
# 将字符串作为代码执行
print(eval("1+2"))


# __repr__  返回符合python语法格式的字符串

class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def __repr__(self):
        return 'Person("%s", %s)' % (self.name, self.age)


p = Person("xxxx", 33)
message = p.__repr__()
obj = eval(message)
print(obj.__dict__)

